namespace Aurora.TaskScheduler.Abstractions.BaseModel;

/// <summary>
/// job 的结果
/// </summary>
public class JobResult
{
    /// <summary>
    /// 消息
    /// </summary>
    public string Message { get; set; }

    /// <summary>
    /// 是否成功
    /// </summary>
    public bool Success { get; set; }

    /// <summary>
    /// 用于自定义的结果 可能不需要
    /// </summary>
    public object Data { get; set; }


    /// <summary>
    /// 创建成功的结果
    /// </summary>
    /// <returns></returns>
    public static JobResult CreateSuccess()
    {
        return new JobResult()
        {
            Success = true,
            Message = "执行成功"
        };
    }
}